package com.sgb.merchant.view.adapter;

import androidx.annotation.Nullable;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sgb.link.entity.merchant.DynamicListEntity;
import com.sgb.merchant.BR;
import com.sgb.merchant.R;

import java.util.List;

/**
 * @author: 王彬臣
 * @date: 2021/10/14
 * @Description: 产业园区动态列表
 */
public class DynamicAdapter extends BaseQuickAdapter<DynamicListEntity, BaseViewHolder> {
    public DynamicAdapter(@Nullable @org.jetbrains.annotations.Nullable List<DynamicListEntity> data) {
        super(R.layout.merchant_item_dynamic, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, DynamicListEntity item) {
        ViewDataBinding binding = DataBindingUtil.bind(helper.itemView);
        binding.setVariable(BR.viewModel, item);
    }
}
